home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-12-09 | 805 b | 31 lines | [TEXT/ToyS] |
- tell application "Envelope Window 1.1"
- activate
-
- set myfile to choose file with prompt "Choose the Easy Envelopes address list to import"
- set mydelimiters to return --type the delimiter character used by your address program between the quotes
-
- set old_delims to AppleScript's text item delimiters
-
- set myinput to open for access myfile
- set mylist to read myinput using delimiters mydelimiters as list
-
- set this_address to ""
-
- repeat with each_address in mylist
-
- set this_line to each_address & return
-
- if this_line is mydelimiters then
-
- if this_address is not "" then
- add address this_address
- end if
-
- set this_address to ""
- else
- set this_address to this_address & this_line
- end if
- end repeat
-
- set AppleScript's text item delimiters to old_delims
- end tell